package top.wyix.module.bpm.dal.mysql.definition;

import org.apache.ibatis.annotations.Mapper;
import top.wyix.framework.mybatis.core.mapper.BaseMapperX;
import top.wyix.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;

import java.util.Collection;
import java.util.List;

/**
 * @author wangdx
 */
@Mapper
public interface BpmProcessDefinitionInfoMapper extends BaseMapperX<BpmProcessDefinitionInfoDO> {
    default List<BpmProcessDefinitionInfoDO> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
        return selectList(BpmProcessDefinitionInfoDO::getProcessDefinitionId, processDefinitionIds);
    }

    default BpmProcessDefinitionInfoDO selectByProcessDefinitionId(String processDefinitionId) {
        return selectOne(BpmProcessDefinitionInfoDO::getProcessDefinitionId, processDefinitionId);
    }
}
